package com.huiquan.management.service;

import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.huiquan.framework.base.BaseService;
import com.huiquan.framework.base.ReturnCode;
import com.huiquan.framework.base.ReturnData;
import com.huiquan.framework.dao.StaticDataDao;
import com.huiquan.framework.utils.ReturnUtil;

@Service
public class StaticDataService extends BaseService {

	@Autowired
	private StaticDataDao staticDataDao;

	public ReturnData update(String codeType,String value) throws Exception {
		if(StringUtils.isNotBlank(codeType)){
			staticDataDao.update(codeType, value);
		}else{
			ReturnCode rc = ReturnCode.DYNAMIC_DESC_EXCEPTION;
			rc.setDesc("code不能为空");
			ReturnUtil.fail(rc);
		}
		return ReturnUtil.success();
	}
	


}
